package cn.wolfcode.luowowo.search.query;

import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;


/**
 * 搜索条件封装对象
 */
@Setter
@Getter
public class SearchQueryObject extends QueryObject {

    public static final int SEARCHE_TYPE_ALL = -1;
    public static final int SEARCHE_TYPE_DEST = 0;
    public static final int SEARCHE_TYPE_STRATEGY = 1;
    public static final int SEARCHE_TYPE_TRAVEL = 2;
    public static final int SEARCHE_TYPE_USER = 3;

    private int type = -1;


    public Pageable getPageable(){
        return PageRequest.of(super.getCurrentPage()-1, super.getPageSize());
    }










}
